package com.hifar.test.syncData.pojo.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hifar.plat.AopOption.Dict;
import com.hifar.test.syncData.pojo.HfEnvSyncDataExportTableInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author zhuWeiWei
 * @description 数据导出任务详情VO
 * @date 2025/10/31
 */
@Data
@ApiModel("数据导出任务详情")
public class SyncDataExportTaskDetailVO {

    @ApiModelProperty("任务ID")
    private String id;

    @ApiModelProperty("同步编码")
    private String syncCode;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("导出开始时间")
    private Date startTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("导出结束时间")
    private Date endTime;

    @ApiModelProperty("导出进度")
    private BigDecimal schedule;

    @ApiModelProperty("状态：1-未开始 2-导出中 3-导出失败 4-已导出")
    private String status;

    @ApiModelProperty("失败原因")
    private String remarks;

    @ApiModelProperty("导出文件路径")
    private String filePath;

    @ApiModelProperty("任务数量（实际导出的表数量）")
    private Integer taskCount;

    @ApiModelProperty("创建人")
    private String createUserName;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("密级")
    @Dict(dictCode = "hf_sys_datasecret")
    private Integer secretLevel;

    @ApiModelProperty("密级文本")
    private String secretLevel_dictText;

    @ApiModelProperty("总记录数量")
    private Integer totalRecordNum;

    @ApiModelProperty("成功导出的表数量")
    private Integer successTableCount;

    @ApiModelProperty("失败的表数量")
    private Integer failTableCount;

    @ApiModelProperty("附件总数")
    private Integer totalFileCount;

    @ApiModelProperty("附件成功数")
    private Integer successFileCount;

    @ApiModelProperty("附件失败数")
    private Integer failFileCount;

    @ApiModelProperty("表导出详情列表")
    private List<HfEnvSyncDataExportTableInfo> tableInfoList;
}

